<?php
/**
 * 
 * @author spring
 * @version 2014-6-7 上午9:09:57
 */
class  Controller_InventoryApi extends Controller {
	
	public function before(){
		parent::before();
	}
	
	/**
	 * 
	 * Description
	 * 这里是hrpose的一个demo目的是实现非ajax的远程调用类似于phprpc或者说是phprpc的升级版
	 * 
	 */
	public function action_index()
	{
 		require_once(Kohana::find_file('vendor', 'Hprose/HproseHttpServer'));
 		function hello($name){
 			return 'hello:'.$name;
 		}
 		$server = new HproseHttpServer();
 		$server->addFunction("hello");
 		$server->handle();
 	}
	
}
